<?php $portfolioData = $this->PortfolioData;
//Zend_Debug::dump($this->get_id);exit();
if ($this->get_id==0){
?>
<div class="contentcontainer">
            <div class="headings altheading">
                <h2>Page content</h2>
            </div>

            <div class="contentbox">
            <div align="left"><H1><a href="http://<?php echo $_SERVER['HTTP_HOST'] . '/control/'.$this->controller.'/add/'; ?>">+</a></H1></div>
            	<table width="100%">
                	<thead>
                    	<tr>
                        	<th>Project name</th>
                            <th>Case study</th>
                            <th>Actions</th>
                        </tr>
                    </thead>
                    <tbody>
<?php foreach ($portfolioData as $row) { ?>
                         <tr class="alt">
                        	<td><?php echo $row['id_page']; ?></td>
                            <td><?php echo substr($row['content'],0,70); ?></td>
                            <td>
                            	<a href="http://<?php echo $_SERVER['HTTP_HOST'].'/control/'.$this->controller.'/'.$this->action.'/id/'.$row['id']; ?>" title=""><img SRC="/img/icons/icon_edit.png" alt="Edit" /></a>&nbsp;&nbsp;&nbsp;
                                <a href="http://<?php echo $_SERVER['HTTP_HOST'].'/control/'.$this->controller.'/'.$this->action.'/id/'.$row['id'].'/del/1/'; ?>" title=""><img SRC="/img/icons/icon_delete.png" alt="Delete" /></a>
                            </td>
                        </tr>
<?php } ?>
                    </tbody>
                </table>
            <div align="left"><H1><a href="http://<?php echo $_SERVER['HTTP_HOST'] . '/control/'.$this->controller.'/add/'; ?>">+</a></H1></div>
                <div style="clear: both;"></div>
            </div>

        </div>
<?php } elseif ($this->get_id>0 && $this->get_del==0) { ?>
         <div class="contentcontainer">
            <div class="headings alt">
                <h2>Editing...</h2>
            </div>
            <div class="contentbox">
<?php echo $this->form;?>
            </div>
        </div>
<?php } elseif ($this->get_id>0 && $this->get_del==1) { ?>
         <div class="contentcontainer">
            <div class="headings alt">
                <h2>Deleting...</h2>
            </div>
            <div class="contentbox" align="center">
                Are you sure want to delete:
                <H1><?php echo substr($this->NameToDelete[0]['content'],0,50 ) ;  ?> ?</H1><br>
            	<form action="<?php echo $this->url(array('module'=>'control','controller'=>''.$this->controller.'','action'=>'edit-content')); ?>" method="post">
                    <input type="hidden" name="id" value="<?php echo $this->NameToDelete[0]['id']; ?>" />
                    <input type="submit" name="del" value="<?php echo $this->yesButton; ?>" class="btn" />
                    <input type="submit" name="del" value="<?php echo $this->noButton; ?>" class="btn" />
                </form>
            </div>
        </div>
<?php } else {} ?>